package com.example.healkepdoctor.model;

import android.os.Parcel;
import android.os.Parcelable;

public class Weight implements Parcelable {
    private String username;

    private double weight;

    private String date;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.username);
        dest.writeDouble(this.weight);
        dest.writeString(this.date);
    }

    public void readFromParcel(Parcel source) {
        this.username = source.readString();
        this.weight = source.readDouble();
        this.date = source.readString();
    }

    public Weight() {
    }

    protected Weight(Parcel in) {
        this.username = in.readString();
        this.weight = in.readDouble();
        this.date = in.readString();
    }

    public static final Creator<Weight> CREATOR = new Creator<Weight>() {
        @Override
        public Weight createFromParcel(Parcel source) {
            return new Weight(source);
        }

        @Override
        public Weight[] newArray(int size) {
            return new Weight[size];
        }
    };
}
